Quartz 2D
   HOME

TheInfoList



OR:

Quartz 2D is the native two-dimensional graphics rendering
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
for
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
and
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also includes ...
platforms, part of the
Core Graphics In Apple's macOS operating system, Quartz is the Quartz 2D and Quartz Compositor part of the Core Graphics framework. Quartz includes both a 2D renderer in Core Graphics and the composition engine that sends instructions to the graphics card. ...
framework.


Overview

Quartz 2D is available to all macOS and iOS application environments and provides resolution-independent and device-independent rendering of bitmap graphics, text, and vectors both on-screen and in preparation for printing. Its responsibilities within the graphics layer include: * Rendering text * Displaying, manipulating, and rendering
PDF Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
documents * Converting
PostScript PostScript (PS) is a page description language in the electronic publishing and desktop publishing realm. It is a dynamically typed, concatenative programming language. It was created at Adobe Systems by John Warnock, Charles Geschke, Doug Br ...
data to PDF data, and vice versa * Displaying, manipulating, and rendering bitmap images * Providing color management via
ColorSync This is a list of macOS built-in apps and system components. Applications App Store The Mac App Store is macOS's digital distribution platform for macOS apps, created and maintained by Apple Inc. based on the iOS version, the platform was an ...
* Displaying the elements of the
Aqua Aqua is the Latin word for water. It is used in many words which relate to water, such as aquatic life. In English, it may also refer to: Arts * Aqua (color), a greenish-blue color Business * Aqua (skyscraper), an 82-story residential skysc ...
user interface Because Quartz 2D is one of several Quartz Technologies, the term "Quartz" by itself must be taken in context.


Drawing in Quartz 2D

Quartz 2D expands the drawing functions associated with
QuickDraw A quickdraw (also known as an extender) is a piece of climbing equipment used by rock and ice climbers to allow the climbing rope to run freely through protection such as a bolt anchors or other traditional gear while leading. A quickdraw ...
. The most notable difference is that Quartz 2D eliminates output device and resolution specificity. The drawing model utilized by Quartz 2D is based on PDF specification 1.4. Drawing takes place using a
Cartesian coordinate system A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in t ...
, where text, vectors, or bitmap images are placed on a grid. However, drawing output is not sent directly to the output device. Quartz 2D uses graphics contexts, environments in which drawing takes place. Each graphics context defines how the drawing should be presented: in a window, sent to a printer, an OpenGL layer, or off-screen. Each context rasterizes the drawing at the desired resolution without altering the data that defines the drawing. Thus, contexts are the mechanism by which Quartz 2D employs resolution- and device-independence. For example, a window context may rasterize an object to the appropriate screen resolution to create actual graphics on the display. The same object can be sent to a printing context at a much higher resolution. This permits the same graphics commands to yield output on any device using the most appropriate resolution.


History

Quartz 2D is similar to
NeXT Next may refer to: Arts and entertainment Film * ''Next'' (1990 film), an animated short about William Shakespeare * ''Next'' (2007 film), a sci-fi film starring Nicolas Cage * '' Next: A Primer on Urban Painting'', a 2005 documentary film Lit ...
's
Display PostScript Display PostScript (or DPS) is a 2D graphics engine system for computers which uses the PostScript (PS) imaging model and language (originally developed for computer printing) to generate on-screen graphics. To the basic PS system, DPS adds a num ...
in its use of contexts. It first appeared as the 2D graphics rendering library called Core Graphics Rendering; along with Core Graphics Services (Compositing), it was wrapped into the initial incarnation of Quartz. Quartz (and its renderer) were first demonstrated at WWDC in May 1999. Presently, the name ''Quartz 2D'' more precisely defines the 2D rendering capabilities of Core Graphics (Quartz). With the release of Mac OS X 10.2, marketing attention focused on
Quartz Extreme Quartz Compositor is the display server (and at the same time the compositing window manager) in macOS. It is responsible for presenting and maintaining rasterized, rendered graphics from the rest of the Core Graphics framework and other render ...
, the composition layer, leaving the term "Quartz" to refer to the Core Graphics framework or just its 2D renderer. Presently, ''Quartz'' technologies can describe all of the rendering and compositing technologies introduced by macOS (including
Core Image Core Image is a pixel-accurate, near-realtime, non-destructive image processing technology in Mac OS X. Implemented as part of the QuartzCore framework of Mac OS X 10.4 and later, Core Image provides a plugin-based architecture for applying fil ...
for example). Prior to Mac OS X Tiger, QuickDraw rendering outperformed that of Quartz 2D. Mac OS X 10.4 rectified this, substantially increasing the standard rendering performance of Quartz 2D.Mac OS X 10.4 Tiger , Ars Technica
/ref> Tiger also introduced Quartz 2D Extreme: optional graphics processor (GPU) acceleration for Quartz 2D, although it is not an officially supported feature. Quartz 2D Extreme is disabled by default in Mac OS X 10.4 because it may lead to video redraw issues or kernel panics. In Mac OS X Leopard, Quartz 2D Extreme was renamed QuartzGL.


See also

*
Quartz (graphics layer) In Apple's macOS operating system, Quartz is the Quartz 2D and Quartz Compositor part of the Core Graphics framework. Quartz includes both a 2D renderer in Core Graphics and the composition engine that sends instructions to the graphics card. ...
*
Quartz Compositor Quartz Compositor is the display server (and at the same time the compositing window manager) in macOS. It is responsible for presenting and maintaining rasterized, rendered graphics from the rest of the Core Graphics framework and other render ...
*
QuickDraw A quickdraw (also known as an extender) is a piece of climbing equipment used by rock and ice climbers to allow the climbing rope to run freely through protection such as a bolt anchors or other traditional gear while leading. A quickdraw ...
*
Display PostScript Display PostScript (or DPS) is a 2D graphics engine system for computers which uses the PostScript (PS) imaging model and language (originally developed for computer printing) to generate on-screen graphics. To the basic PS system, DPS adds a num ...
*
Core Image Core Image is a pixel-accurate, near-realtime, non-destructive image processing technology in Mac OS X. Implemented as part of the QuartzCore framework of Mac OS X 10.4 and later, Core Image provides a plugin-based architecture for applying fil ...
*
Direct2D Direct2D is a 2D computer graphics, 2D vector graphics, vector graphics application programming interface (API) designed by Microsoft and implemented in Windows 10, Windows 8, Windows 7 and Windows Server 2008 R2, and also Windows Vista and Windows ...


References

{{reflist


External links


Mac OS X – Features – Quartz Extreme
– from Apple
Introduction to Quartz 2D Programming Guide
– developer documentation from Apple

– developer documentation from O'Reilly's MacDevCenter Graphics libraries macOS APIs